Reset identity seeding in SQL server on ID column Where ID column is auto increment.
And don't use the drop, delete or truncate command on That table.
Home / DeveloperSection / Forums / How can reset identity seeding in SQL on ID column ?
Reset identity seeding in SQL server on ID column Where ID column is auto increment.
And don't use the drop, delete or truncate command on That table.
Aryan Kumar
18-Jun-2023There are two ways to reset identity seeding in SQL on an ID column:
SQL
The RESEED parameter specifies the new value for the identity seed. In this case, the new value is 1.
SQL
Which method should you use?
The best method to use depends on your specific needs. If you only need to reset the identity seeding for a small number of rows, then the DBCC CHECKIDENT procedure is a good option. However, if you need to reset the identity seeding for a large number of rows, then the TRUNCATE TABLE statement is a better option.
Here are some things to keep in mind when resetting identity seeding:
Anonymous User
03-Aug-2018